<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>统计分析</title>
    <link rel="stylesheet" href="../../lib/layui/css/layui.css">
    <link rel="stylesheet" href="../css/common/index.css">
    <link rel="stylesheet" href="../../assets/icons/iconfont.css">
    <link rel="stylesheet" href="../css/index.css">
    <link rel="stylesheet" href="../css/analysis.css">
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <!-- 顶栏导航 begin -->
    <div class="layui-header">
        <div class="layui-logo">
            <img src="../images/logo.png" class="x-logo">
            <img src="../images/title.png" class="x-top-title">
        </div>
        <div class="layui-layout-right">
            <ul class="layui-nav x-top-nav">
                <li class="layui-nav-item active">
                    <a href="javascript:void(0)">
                        <div class="nav-top-item">
                            <img class="nav-top-icon" src="../images/nav/nav-index.png">
                            首页
                        </div>
                        <i class="split-line"></i>
                    </a>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:void(0)">
                        <div class="nav-top-item">
                            <img class="nav-top-icon" src="../images/nav/nav-index.png">
                            任务核查
                        </div>
                        <i class="split-line"></i></a></li>
                <li class="layui-nav-item">
                    <a href="javascript:void(0)">
                        <div class="nav-top-item">
                            <img class="nav-top-icon" src="../images/nav/nav-index.png">
                            人员管理
                        </div>
                        <i class="split-line"></i></a></li>
                <li class="layui-nav-item">
                    <a href="javascript:void(0)">
                        <div class="nav-top-item">
                            <img class="nav-top-icon" src="../images/nav/nav-tjfx.png">
                            统计分析
                        </div>
                        <i class="split-line"></i>
                    </a>
                </li>
            </ul>
            <ul class="x-nav-user">
                <li class="layui-nav-item">
                    <dl class="x-user-info">
                        <dd class="x-user-photo">
                            <img src="../images/user.png">
                        </dd>
                        <dd class="x-user-text-box">
                            <span class="x-user-name">系统管理员：王要得</span>
                            <span class="x-user-score">积分：279</span>
                        </dd>
                        <dd class="x-user-logout">
                            <img class="nav-logout-icon" src="../images/nav/nav-logout.png">
                        </dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>
    <!-- 顶栏导航 end -->

    <!-- 主体内容 begin -->
    <div class="content-center content-limit">
        <div class="row-box" style="width: 1200px;margin: auto;">
            <div class="layui-row layui-col-space20 x-m-top">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">筛选查询</div>
                        <div class="layui-card-body">
                            <!--筛选查询内容-->
                            <form action="" class="layui-form" style="margin: 28px auto 28px -25px;">
                                <div class="layui-form-item">
                                    <div class="layui-inline">
                                        <label class="layui-form-label">时间：</label>
                                        <div class="layui-input-inline">
                                            <select name="timeline" lay-verify="required" lay-search="">
                                                <option value="1">2018-05-20</option>
                                                <option value="2">2018-05-21</option>
                                                <option value="3">2018-05-22</option>
                                                <option value="4">2018-05-23</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">单位：</label>
                                        <div class="layui-input-block">
                                            <input type="text" name="compony" lay-verify="required" class="layui-input">
                                            <!--<span class="search-icon"><i class=""></i></span>-->
                                            <div style="height: 30px;" class="x-input-bottom layui-icon layui-icon-search"
                                                 onclick="_fn.searchInput('unit')"></div>
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <button class="layui-btn layui-btn-normal btn" style="margin-left: 25px;"><i
                                                class="iconfont icon-search"></i>查询
                                        </button>
                                        <button class="layui-btn layui-btn-warm btn"><i
                                                class="layui-icon layui-icon-delete"></i>清空
                                        </button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row layui-col-space20">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">核查结果情况</div>
                        <div class="layui-card-body">
                            <!--核查结果情况内容-->
                            <div class="reminder">
                                <div class="triangle-blue"></div>
                                <div class="reminder-title">生成报告：</div>
                                <p>2018-01-01至2018-06-21，核查总量为：10240件，其中聘用文职2014，其中聘用文职2014其中
                                    聘用文职2014其中聘用文职2014其中聘用文职2014其中聘用文职2014</p>
                            </div>
                            <div class="layui-tab layui-tab-brief" lay-filter="tabBar" style="min-height: 400px;">
                                <ul class="layui-tab-title" style="position: relative;left: 930px;">
                                    <li lay-id="bar1" class="layui-this">按年</li>
                                    <li lay-id="bar2">按月</li>
                                    <li lay-id="bar3">按周</li>
                                </ul>
                                <div class="layui-tab-content" style="min-height: 100px;">
                                    <div class="layui-tab-item layui-show content" id="myBar"></div>
                                    <div class="layui-tab-item content" id="myBar2">内容2</div>
                                    <div class="layui-tab-item content" id="myBar3">内容3</div>
                                </div>
                            </div>
                            <!--<div class="content" id="myBar"></div>-->
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row layui-col-space20">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">核查结果情况</div>
                        <div class="layui-card-body" style="min-height: 500px;padding: 15px;display: inline-block;">
                            <!--核查结果情况内容-->
                            <div class="layui-tab layui-tab-brief third-left-content" lay-filter="tabPie">
                                <ul class="layui-tab-title" style="left: 0;margin: 10px 20px;position: relative;">
                                    <li class="layui-this">按年</li>
                                    <li>按月</li>
                                    <li>按周</li>
                                </ul>
                                <div class="layui-tab-content" style="min-height: 100px;">
                                    <div class="layui-tab-item layui-show pie-content" id="myPie"></div>    <!--按年-->
                                    <div class="layui-tab-item pie-content" id="myPie2"></div>   <!--按月-->
                                    <div class="layui-tab-item pie-content" id="myPie3"></div>   <!--按周-->
                                </div>
                            </div>
                            <div class="reminder reminder-right">
                                <div class="triangle-blue"></div>
                                <div class="reminder-title">生成报告：</div>
                                <p>2018-01-01至2018-06-21，核查总量为：10240件，其中聘用文职2014，其中聘用文职2014其中
                                    聘用文职2014其中聘用文职2014其中聘用文职2014其中聘用文职2014</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row layui-col-space20">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">2017各大单位核查数量统计</div>
                        <div class="layui-card-body">
                            <!--2017各大单位核查数量统计-->
                            <div class="reminder">
                                <div class="triangle-blue"></div>
                                <div class="reminder-title">生成报告：</div>
                                <p>2018-01-01至2018-06-21，核查总量为：10240件，其中聘用文职2014，其中聘用文职2014其中
                                    聘用文职2014其中聘用文职2014其中聘用文职2014其中聘用文职2014核查总量为：10240件，其中聘用文职2014，其中聘用文职2014其中
                                    聘用文职2014其中聘用文职2014其中聘用文职2014其中聘用文职2014</p>
                            </div>
                            <div class="rank-list">
                                <ul>
                                    <li><span>1</span><span>东部战区</span><span>1235</span></li>
                                    <li><span style="background: #ff9933;">2</span><span>东部战区</span><span
                                            style="color: #ff9933;">1235</span></li>
                                    <li><span style="background: #2cae00;">3</span><span>东部战区</span><span
                                            style="color: #2cae00;">1235</span></li>
                                </ul>
                            </div>
                            <div class="layui-tab layui-tab-brief" lay-filter="unitTabBrief" style="min-height: 400px;">
                                <ul class="layui-tab-title" style="top: 215px;">
                                    <li class="layui-this">按年</li>
                                    <li>按月</li>
                                    <li>按周</li>
                                </ul>
                                <div class="layui-tab-content" style="min-height: 100px;">
                                    <div class="layui-tab-item layui-show content" id="unitSumBar"></div>
                                    <div class="layui-tab-item content" id="unitSumBar2">内容2</div>
                                    <div class="layui-tab-item content" id="unitSumBar3">内容3</div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 主体内容 end -->
</div>
<script src="../../lib/layui/layui.all.js"></script>
<script src="../../lib/jquery-1.9.1.min.js"></script>
<script src="../../lib/echarts/echarts.js"></script>
<script>
    (function () {
        var form = layui.form
            , element = layui.element
        var cacheChartState = {
            bar1: false,
            bar2: false,
            bar3: false,
            pie1: false,
            pie2: false,
            pie3: false,
            spie1: false,
            spie2: false,
            spie3: false
        }
        var _fn = {
            init: function () {
                // 监听统计切换
                element.on('tab(tabBar)', function (data) {
                    var _ii = data.index + 1
                    if (!cacheChartState['bar' + _ii]) {
                        var _cuFn = _fn['resultVerify' + _ii]
                        if (typeof _cuFn === 'function') {
                            _cuFn()
                        }
                    }
                })
                element.on('tab(tabPie)', function (data) {
                    var _ii = data.index + 1
                    if (!cacheChartState['pie' + _ii]) {
                        var _cuFn = _fn['resultPie' + _ii]
                        if (typeof _cuFn === 'function') {
                            _cuFn()
                        }
                    }
                })
                element.on('tab(unitTabBrief)', function (data) {
                    var _ii = data.index + 1
                    if (!cacheChartState['spie' + _ii]) {
                        var _cuFn = _fn['sumUnitStatic' + _ii]
                        if (typeof _cuFn === 'function') {
                            _cuFn()
                        }
                    }
                })
                // 初始化图表
                this.resultVerify1();
                this.resultPie1();
                this.sumUnitStatic1();
            },
            resultVerify1: function () {     //核查结果情况内容柱状图
                var rvBar = echarts.init(document.getElementById('myBar'));
                var xAxisDataList = ['上访重点人员', '有精神病史人员', '曾持无效、身份证人员',
                        '有过贩毒、吸毒经历人员', '有过贩毒、吸毒经历人员', '有过贩毒、吸毒经历人员',
                        '有过贩毒、吸毒经历人员', '上访重点人员', '有精神病史人员', '曾持无效、身份证人员'],  //横坐标上的数据
                    seriesData = [1050, 2050, 2000, 3340, 3904, 3305, 5600, 2050, 2000, 3340]; //纵坐标数据
                option = {
                    color: ['#3398DB'],
                    tooltip: {
                        trigger: 'axis',
                        axisPointer: {            // 坐标轴指示器，坐标轴触发有效
                            type: 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
                        },
                        formatter: "{b0}:{c0}"
                    },
                    grid: {
                        left: '0%',
                        right: '0%',
                        bottom: '0%',
                        containLabel: true
                    },
                    xAxis: [
                        {
                            type: 'category',
                            data: xAxisDataList,
                            axisTick: {
                                alignWithLabel: true
                            },
                            axisLabel: {
                                formatter: function (value) {
                                    var ret = ""; //拼接加\n返回的类目项
                                    var maxLength = 4; //每项显示文字个数
                                    var valLength = value.length; //X轴类目项的文字个数
                                    var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
                                    if (rowN > 1) //如果类目项的文字大于3,
                                    {
                                        for (var i = 0; i < rowN; i++) {
                                            var temp = ""; //每次截取的字符串
                                            var start = i * maxLength; //开始截取的位置
                                            var end = start + maxLength; //结束截取的位置
                                            //这里也可以加一个是否是最后一行的判断，但是不加也没有影响，那就不加吧
                                            temp = value.substring(start, end) + "\n";
                                            ret += temp; //凭借最终的字符串
                                        }
                                        return ret;
                                    } else {
                                        return value;
                                    }
                                },
                                interval: 0,
                                fontSize: 16,
                                fontWeight: 100,
                                textStyle: {
                                    color: '#707070',
                                    fontSize: 14
                                },
                            },
                            axisLine: {
                                lineStyle: {
                                    color: '#d7d7d7'
                                }
                            }
                        }
                    ],
                    yAxis: [
                        {
                            type: 'value',
                            axisLine: {
                                lineStyle: {
                                    color: '#d7d7d7'        //横坐标线条颜色
                                }
                            },
                            axisLabel: {
                                textStyle: {
                                    color: '#777777',    //横坐标上的标签颜色
                                    fontSize: 14,
                                }
                            },

                        }
                    ],
                    series: [
                        {
                            name: '直接访问',
                            type: 'bar',
                            barWidth: '30%',
                            data: seriesData,
                            label: {
                                normal: {
                                    show: true,
                                    position: 'top',
                                    textStyle: {
                                        color: '#00cccc',
                                        fontSize: 14,
                                        fontFamily: 'Arail',
                                        fontWeight: 'bold'
                                    }
                                }
                            },
                            itemStyle: {
                                normal: {
                                    color: {
                                        type: 'linear',
                                        x: 0,
                                        y: 0,
                                        x2: 0,
                                        y2: 1,
                                        colorStops: [{
                                            offset: 0,
                                            color: '#00cccc' // 0% 处的颜色
                                        }, {
                                            offset: 1,
                                            color: '#479fdf' // 100% 处的颜色
                                        }],
                                        globalCoord: false // 缺省为 false
                                    },
                                    // barBorderRadius: 15,
                                }
                            },
                        }
                    ]
                };
                rvBar.setOption(option);
                cacheChartState.bar1 = true
            },
            resultVerify2: function () {     //核查结果情况内容柱状图
                var rvBar = echarts.init(document.getElementById('myBar2'));
                var xAxisDataList = ['上访重点人员', '有精神病史人员', '曾持无效、身份证人员',
                        '有过贩毒、吸毒经历人员', '有过贩毒、吸毒经历人员', '有过贩毒、吸毒经历人员',
                        '有过贩毒、吸毒经历人员', '上访重点人员', '有精神病史人员', '曾持无效、身份证人员'],  //横坐标上的数据
                    seriesData = [1050, 2050, 2000, 3340, 3904, 3305, 5600, 2050, 2000, 3340]; //纵坐标数据
                option = {
                    color: ['#3398DB'],
                    tooltip: {
                        trigger: 'axis',
                        axisPointer: {            // 坐标轴指示器，坐标轴触发有效
                            type: 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
                        },
                        formatter: "{b0}:{c0}"
                    },
                    grid: {
                        left: '0%',
                        right: '0%',
                        bottom: '0%',
                        containLabel: true
                    },
                    xAxis: [
                        {
                            type: 'category',
                            data: xAxisDataList,
                            axisTick: {
                                alignWithLabel: true
                            },
                            axisLabel: {
                                formatter: function (value) {
                                    var ret = ""; //拼接加\n返回的类目项
                                    var maxLength = 4; //每项显示文字个数
                                    var valLength = value.length; //X轴类目项的文字个数
                                    var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
                                    if (rowN > 1) //如果类目项的文字大于3,
                                    {
                                        for (var i = 0; i < rowN; i++) {
                                            var temp = ""; //每次截取的字符串
                                            var start = i * maxLength; //开始截取的位置
                                            var end = start + maxLength; //结束截取的位置
                                            //这里也可以加一个是否是最后一行的判断，但是不加也没有影响，那就不加吧
                                            temp = value.substring(start, end) + "\n";
                                            ret += temp; //凭借最终的字符串
                                        }
                                        return ret;
                                    } else {
                                        return value;
                                    }
                                },
                                interval: 0,
                                fontSize: 16,
                                fontWeight: 100,
                                textStyle: {
                                    color: '#707070',
                                    fontSize: 14
                                },
                            },
                            axisLine: {
                                lineStyle: {
                                    color: '#d7d7d7'
                                }
                            }
                        }
                    ],
                    yAxis: [
                        {
                            type: 'value',
                            axisLine: {
                                lineStyle: {
                                    color: '#d7d7d7'        //横坐标线条颜色
                                }
                            },
                            axisLabel: {
                                textStyle: {
                                    color: '#777777',    //横坐标上的标签颜色
                                    fontSize: 14,
                                }
                            },

                        }
                    ],
                    series: [
                        {
                            name: '直接访问',
                            type: 'bar',
                            barWidth: '30%',
                            data: seriesData,
                            label: {
                                normal: {
                                    show: true,
                                    position: 'top',
                                    textStyle: {
                                        color: '#00cccc',
                                        fontSize: 14,
                                        fontFamily: 'Arail',
                                        fontWeight: 'bold'
                                    }
                                }
                            },
                            itemStyle: {
                                normal: {
                                    color: {
                                        type: 'linear',
                                        x: 0,
                                        y: 0,
                                        x2: 0,
                                        y2: 1,
                                        colorStops: [{
                                            offset: 0,
                                            color: '#00cccc' // 0% 处的颜色
                                        }, {
                                            offset: 1,
                                            color: '#479fdf' // 100% 处的颜色
                                        }],
                                        globalCoord: false // 缺省为 false
                                    },
                                    // barBorderRadius: 15,
                                }
                            },
                        }
                    ]
                };
                rvBar.setOption(option);
                cacheChartState.bar2 = true
            },
            resultVerify3: function () {     //核查结果情况内容柱状图
                var rvBar = echarts.init(document.getElementById('myBar3'));
                var xAxisDataList = ['上访重点人员', '有精神病史人员', '曾持无效、身份证人员',
                        '有过贩毒、吸毒经历人员', '有过贩毒、吸毒经历人员', '有过贩毒、吸毒经历人员',
                        '有过贩毒、吸毒经历人员', '上访重点人员', '有精神病史人员', '曾持无效、身份证人员'],  //横坐标上的数据
                    seriesData = [1050, 2050, 2000, 3340, 3904, 3305, 5600, 2050, 2000, 3340]; //纵坐标数据
                option = {
                    color: ['#3398DB'],
                    tooltip: {
                        trigger: 'axis',
                        axisPointer: {            // 坐标轴指示器，坐标轴触发有效
                            type: 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
                        },
                        formatter: "{b0}:{c0}"
                    },
                    grid: {
                        left: '0%',
                        right: '0%',
                        bottom: '0%',
                        containLabel: true
                    },
                    xAxis: [
                        {
                            type: 'category',
                            data: xAxisDataList,
                            axisTick: {
                                alignWithLabel: true
                            },
                            axisLabel: {
                                formatter: function (value) {
                                    var ret = ""; //拼接加\n返回的类目项
                                    var maxLength = 4; //每项显示文字个数
                                    var valLength = value.length; //X轴类目项的文字个数
                                    var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
                                    if (rowN > 1) //如果类目项的文字大于3,
                                    {
                                        for (var i = 0; i < rowN; i++) {
                                            var temp = ""; //每次截取的字符串
                                            var start = i * maxLength; //开始截取的位置
                                            var end = start + maxLength; //结束截取的位置
                                            //这里也可以加一个是否是最后一行的判断，但是不加也没有影响，那就不加吧
                                            temp = value.substring(start, end) + "\n";
                                            ret += temp; //凭借最终的字符串
                                        }
                                        return ret;
                                    } else {
                                        return value;
                                    }
                                },
                                interval: 0,
                                fontSize: 16,
                                fontWeight: 100,
                                textStyle: {
                                    color: '#707070',
                                    fontSize: 14
                                },
                            },
                            axisLine: {
                                lineStyle: {
                                    color: '#d7d7d7'
                                }
                            }
                        }
                    ],
                    yAxis: [
                        {
                            type: 'value',
                            axisLine: {
                                lineStyle: {
                                    color: '#d7d7d7'        //横坐标线条颜色
                                }
                            },
                            axisLabel: {
                                textStyle: {
                                    color: '#777777',    //横坐标上的标签颜色
                                    fontSize: 14,
                                }
                            },

                        }
                    ],
                    series: [
                        {
                            name: '直接访问',
                            type: 'bar',
                            barWidth: '30%',
                            data: seriesData,
                            label: {
                                normal: {
                                    show: true,
                                    position: 'top',
                                    textStyle: {
                                        color: '#00cccc',
                                        fontSize: 14,
                                        fontFamily: 'Arail',
                                        fontWeight: 'bold'
                                    }
                                }
                            },
                            itemStyle: {
                                normal: {
                                    color: {
                                        type: 'linear',
                                        x: 0,
                                        y: 0,
                                        x2: 0,
                                        y2: 1,
                                        colorStops: [{
                                            offset: 0,
                                            color: '#00cccc' // 0% 处的颜色
                                        }, {
                                            offset: 1,
                                            color: '#479fdf' // 100% 处的颜色
                                        }],
                                        globalCoord: false // 缺省为 false
                                    },
                                    // barBorderRadius: 15,
                                }
                            },
                        }
                    ]
                };
                rvBar.setOption(option);
                cacheChartState.bar3 = true
            },
            resultPie1: function () {    //核查结果情况内容饼图   按年
                var rvPie = echarts.init(document.getElementById('myPie'));   //按年
                var casePieData = [
                    {value: 150, name: '核查中', itemStyle: {color: '#5ab1ef'}},
                    {value: 250, name: '发现疑点', itemStyle: {color: '#f98689'}},
                    {value: 100, name: '待核查', itemStyle: {color: '#ffb980'}},
                    {value: 200, name: '未发现疑点', itemStyle: {color: '#33cc7d'}},
                    {value: 200, name: '其他', itemStyle: {color: '#b6a2de'}},
                ];
                var legendData = [];  // 图例数据
                var caseCount = 0; // 总数和
                for (var i = 0; i < casePieData.length; i++) {
                    legendData.push(casePieData[i].name);
                    caseCount += (casePieData[i].value || 0);
                }
                var option = {
                    tooltip: {
                        trigger: 'item',
                        formatter: "{b}({d}%)"
                    },
                    legend: {
                        orient: 'vertical',
                        x: 'left',
                        bottom: 10,
                        itemWidth: 16,
                        itemHeight: 16,
                        data: legendData
                    },
                    grid: {
                        show: false,
                        top: 0,
                        left: 0,
                        right: 0,
                        bottom: 0
                    },
                    series: [
                        {
                            name: '总数',
                            type: 'pie',
                            selectedMode: false,
                            legendHoverLink: false,
                            hoverAnimation: false,
                            center: ['50%', '60%'],
                            radius: [0, '42%'],
                            silent: true,
                            label: {
                                show: true,
                                position: 'center',
                                fontFamily: 'Microsoft YaHei',
                                color: '#8A8A8A',
                                fontSize: 18,
                                formatter: `{b}:{ct|{c}}条`,
                                rich: {
                                    ct: {
                                        color: '#8A8A8A',
                                        fontSize: 20
                                    }
                                }
                            },
                            labelLine: {
                                show: false
                            },
                            data: [
                                {value: caseCount, name: '总数', itemStyle: {color: '#E3F6FF'}},
                            ]
                        },
                        {
                            type: 'pie',
                            center: ['50%', '60%'],
                            radius: ['50%', '75%'],
                            label: {
                                show: true,
                                formatter: '\n{hr|}\n{b}({c})',
                                rich: {
                                    hr: {
                                        width: '100%',
                                        height: 1,
                                        backgroundColor: 'auto',
                                        shadowBlur: 2,
                                        shadowOffsetX: 2,
                                        padding: [0, 10]
                                    }
                                }
                            },
                            labelLine: {
                                show: true,
                                length: 10,
                                length2: 20
                            },
                            tooltip: {
                                backgroundColor: 'rgba(0,0,0,0.45)',
                                textStyle: {
                                    color: '#ffffff',
                                    fontFamily: 'Microsoft YaHei'
                                },
                                formatter: function (p) {
                                    var str = p.data.name
                                    if (p.data.value) {
                                        str = p.data.name + '（' + p.data.value + '）'
                                    }
                                    return str
                                }
                            },
                            data: casePieData
                        }
                    ]

                };
                rvPie.setOption(option);   //按年配置
                cacheChartState.pie1 = true
            },
            resultPie2: function () {    //核查结果情况内容饼图  按月
                var rvPie2 = echarts.init(document.getElementById('myPie2'));  //按月
                var casePieData = [
                    {value: 150, name: '核查中', itemStyle: {color: '#5ab1ef'}},
                    {value: 250, name: '发现疑点', itemStyle: {color: '#f98689'}},
                    {value: 100, name: '待核查', itemStyle: {color: '#ffb980'}},
                    {value: 200, name: '未发现疑点', itemStyle: {color: '#33cc7d'}},
                    {value: 200, name: '其他', itemStyle: {color: '#b6a2de'}},
                ];
                var legendData = [];  // 图例数据
                var caseCount = 0; // 总数和
                for (var i = 0; i < casePieData.length; i++) {
                    legendData.push(casePieData[i].name);
                    caseCount += (casePieData[i].value || 0);
                }
                var optionPie2 = {
                    tooltip: {
                        trigger: 'item',
                        formatter: "{b}({d}%)"
                    },
                    legend: {
                        orient: 'vertical',
                        x: 'left',
                        bottom: 10,
                        itemWidth: 16,
                        itemHeight: 16,
                        data: legendData
                    },
                    grid: {
                        show: false,
                        top: 0,
                        left: 0,
                        right: 0,
                        bottom: 0
                    },
                    series: [
                        {
                            name: '总数',
                            type: 'pie',
                            selectedMode: false,
                            legendHoverLink: false,
                            hoverAnimation: false,
                            center: ['50%', '60%'],
                            radius: [0, '42%'],
                            silent: true,
                            label: {
                                show: true,
                                position: 'center',
                                fontFamily: 'Microsoft YaHei',
                                color: '#8A8A8A',
                                fontSize: 18,
                                formatter: `{b}:{ct|{c}}条`,
                                rich: {
                                    ct: {
                                        color: '#8A8A8A',
                                        fontSize: 20
                                    }
                                }
                            },
                            labelLine: {
                                show: false
                            },
                            data: [
                                {value: caseCount, name: '总数', itemStyle: {color: '#E3F6FF'}},
                            ]
                        },
                        {
                            type: 'pie',
                            center: ['50%', '60%'],
                            radius: ['50%', '75%'],
                            label: {
                                show: true,
                                formatter: '\n{hr|}\n{b}({c})',
                                rich: {
                                    hr: {
                                        width: '100%',
                                        height: 1,
                                        backgroundColor: 'auto',
                                        shadowBlur: 2,
                                        shadowOffsetX: 2,
                                        padding: [0, 10]
                                    }
                                }
                            },
                            labelLine: {
                                show: true,
                                length: 10,
                                length2: 20
                            },
                            tooltip: {
                                backgroundColor: 'rgba(0,0,0,0.45)',
                                textStyle: {
                                    color: '#ffffff',
                                    fontFamily: 'Microsoft YaHei'
                                },
                                formatter: function (p) {
                                    var str = p.data.name
                                    if (p.data.value) {
                                        str = p.data.name + '（' + p.data.value + '）'
                                    }
                                    return str
                                }
                            },
                            data: casePieData
                        }
                    ]

                };
                rvPie2.setOption(optionPie2);   //按月配置
                cacheChartState.pie2 = true
            },
            resultPie3: function () {    //核查结果情况内容饼图   按周
                var rvPie3 = echarts.init(document.getElementById('myPie3'));  //按周
                var casePieData = [
                    {value: 150, name: '核查中', itemStyle: {color: '#5ab1ef'}},
                    {value: 250, name: '发现疑点', itemStyle: {color: '#f98689'}},
                    {value: 100, name: '待核查', itemStyle: {color: '#ffb980'}},
                    {value: 200, name: '未发现疑点', itemStyle: {color: '#33cc7d'}},
                    {value: 200, name: '其他', itemStyle: {color: '#b6a2de'}},
                ];
                var legendData = [];  // 图例数据
                var caseCount = 0; // 总数和
                for (var i = 0; i < casePieData.length; i++) {
                    legendData.push(casePieData[i].name);
                    caseCount += (casePieData[i].value || 0);
                }
                var optionPie3 = {
                    tooltip: {
                        trigger: 'item',
                        formatter: "{b}({d}%)"
                    },
                    legend: {
                        orient: 'vertical',
                        x: 'left',
                        bottom: 10,
                        itemWidth: 16,
                        itemHeight: 16,
                        data: legendData
                    },
                    grid: {
                        show: false,
                        top: 0,
                        left: 0,
                        right: 0,
                        bottom: 0
                    },
                    series: [
                        {
                            name: '总数',
                            type: 'pie',
                            selectedMode: false,
                            legendHoverLink: false,
                            hoverAnimation: false,
                            center: ['50%', '60%'],
                            radius: [0, '42%'],
                            silent: true,
                            label: {
                                show: true,
                                position: 'center',
                                fontFamily: 'Microsoft YaHei',
                                color: '#8A8A8A',
                                fontSize: 18,
                                formatter: `{b}:{ct|{c}}条`,
                                rich: {
                                    ct: {
                                        color: '#8A8A8A',
                                        fontSize: 20
                                    }
                                }
                            },
                            labelLine: {
                                show: false
                            },
                            data: [
                                {value: caseCount, name: '总数', itemStyle: {color: '#E3F6FF'}},
                            ]
                        },
                        {
                            type: 'pie',
                            center: ['50%', '60%'],
                            radius: ['50%', '75%'],
                            label: {
                                show: true,
                                formatter: '\n{hr|}\n{b}({c})',
                                rich: {
                                    hr: {
                                        width: '100%',
                                        height: 1,
                                        backgroundColor: 'auto',
                                        shadowBlur: 2,
                                        shadowOffsetX: 2,
                                        padding: [0, 10]
                                    }
                                }
                            },
                            labelLine: {
                                show: true,
                                length: 10,
                                length2: 20
                            },
                            tooltip: {
                                backgroundColor: 'rgba(0,0,0,0.45)',
                                textStyle: {
                                    color: '#ffffff',
                                    fontFamily: 'Microsoft YaHei'
                                },
                                formatter: function (p) {
                                    var str = p.data.name
                                    if (p.data.value) {
                                        str = p.data.name + '（' + p.data.value + '）'
                                    }
                                    return str
                                }
                            },
                            data: casePieData
                        }
                    ]

                };
                rvPie3.setOption(optionPie3);   //按周配置
                cacheChartState.pie3 = true
            },
            sumUnitStatic1: function () {   //2017各大单位核查数量统计
                var susBar = echarts.init(document.getElementById('unitSumBar'));
                var colorList = [
                        {
                            type: 'linear',
                            x: 0,
                            y: 0,
                            x2: 0,
                            y2: 1,
                            colorStops: [{
                                offset: 0,
                                color: '#ec4435' // 0% 处的颜色
                            }, {
                                offset: 1,
                                color: '#ffff99' // 100% 处的颜色
                            }],
                            globalCoord: false // 缺省为 false
                        },
                        {
                            type: 'linear',
                            x: 0,
                            y: 0,
                            x2: 0,
                            y2: 1,
                            colorStops: [{
                                offset: 0,
                                color: '#ecd137' // 0% 处的颜色
                            }, {
                                offset: 1,
                                color: '#ffff99' // 100% 处的颜色
                            }],
                            globalCoord: false // 缺省为 false
                        },
                        {
                            type: 'linear',
                            x: 0,
                            y: 0,
                            x2: 0,
                            y2: 1,
                            colorStops: [{
                                offset: 0,
                                color: '#67c765' // 0% 处的颜色
                            }, {
                                offset: 1,
                                color: '#ffff99' // 100% 处的颜色
                            }],
                            globalCoord: false // 缺省为 false
                        },
                        {
                            type: 'linear',
                            x: 0,
                            y: 0,
                            x2: 0,
                            y2: 1,
                            colorStops: [{
                                offset: 0,
                                color: '#00cccc' // 0% 处的颜色
                            }, {
                                offset: 1,
                                color: '#ffff99' // 100% 处的颜色
                            }],
                            globalCoord: false // 缺省为 false
                        }
                    ], //每个柱子的颜色设置
                    seriesDataList = [2800, 1700, 1200, 1000, 900, 600, 400, 500, 550, 480, 320, 230, 380]; //柱子高度数据
                var option = {
                    color: colorList,
                    tooltip: {
                        show: true,
                        trigger: 'item',
                        formatter: "{c}"
                    },
                    toolbox: {
                        show: true,
                        feature: {
                            mark: {
                                show: true
                            },

                        }
                    },
                    grid: {
                        left: '0%',
                        right: '0%',
                        bottom: '0%',
                        height: '90%',
                        width: '100%',
                        containLabel: true
                    },
                    xAxis: [
                        {
                            type: 'category',
                            axisLine: {
                                lineStyle: {
                                    type: 'solid',
                                    color: '#d7d7d7',//左边线的颜色
                                    width: '1'//坐标线的宽度
                                }
                            },
                            axisLabel: {
                                interval: 0,
                                rotate: 40,
                                show: true,
                                splitNumber: 15,

                                textStyle: {
                                    //fontFamily: "微软雅黑",
                                    fontSize: 14,
                                    color: '#000'
                                },

                            },

                            data: ['东部地区', '南部地区', '东部战区',
                                '南部战区', '南部战区', '陆军', '海军', '空军',
                                '火箭军', '战略支援部队', '军委办公厅', '定州市', '辛集市'],
                            axisTick: {

                                alignWithLabel: true
                            }
                        }
                    ],
                    yAxis: [
                        {
                            type: 'value',
                            name: '',
                            splitLine: {  //分割线
                                show: true,
                                // color:"#fff",
                                lineStyle: {
                                    color: '#d7d7d7'
                                }
                            },
                            axisLabel: {
                                interval: 0,
                                rotate: 0,
                                show: true,
                                splitNumber: 30,
                                textStyle: {
                                    fontSize: 12,
                                    color: '#000'
                                }
                            },
                            axisLine: {
                                lineStyle: {
                                    color: '#d7d7d7'
                                }
                            }
                        },

                    ],
                    series: [
                        {
                            name: '',
                            type: 'bar',
                            barWidth: 30,//柱图宽度
                            label: {
                                normal: {
                                    show: true,
                                    position: 'top',
                                    textStyle: {
                                        //   color: '#00cccc',
                                        fontSize: 14,
                                        fontFamily: 'Arail',
                                        fontWeight: 'bold'
                                    }
                                }
                            },
                            data: seriesDataList,
                            itemStyle: {
                                normal: {
                                    color: function (params) {
                                        return colorList[params.dataIndex]
                                    },
                                    label: {
                                        show: true,
                                        position: 'top',
                                        formatter: '{c}',
                                        textStyle: {
                                            color: colorList
                                        }
                                    }
                                }
                            }
                        }
                    ]
                };
                susBar.setOption(option);
                cacheChartState.spie1 = true
            },
            sumUnitStatic2: function () {   //2017各大单位核查数量统计
                var susBar = echarts.init(document.getElementById('unitSumBar2'));
                var colorList = [
                        {
                            type: 'linear',
                            x: 0,
                            y: 0,
                            x2: 0,
                            y2: 1,
                            colorStops: [{
                                offset: 0,
                                color: '#ec4435' // 0% 处的颜色
                            }, {
                                offset: 1,
                                color: '#ffff99' // 100% 处的颜色
                            }],
                            globalCoord: false // 缺省为 false
                        },
                        {
                            type: 'linear',
                            x: 0,
                            y: 0,
                            x2: 0,
                            y2: 1,
                            colorStops: [{
                                offset: 0,
                                color: '#ecd137' // 0% 处的颜色
                            }, {
                                offset: 1,
                                color: '#ffff99' // 100% 处的颜色
                            }],
                            globalCoord: false // 缺省为 false
                        },
                        {
                            type: 'linear',
                            x: 0,
                            y: 0,
                            x2: 0,
                            y2: 1,
                            colorStops: [{
                                offset: 0,
                                color: '#67c765' // 0% 处的颜色
                            }, {
                                offset: 1,
                                color: '#ffff99' // 100% 处的颜色
                            }],
                            globalCoord: false // 缺省为 false
                        },
                        {
                            type: 'linear',
                            x: 0,
                            y: 0,
                            x2: 0,
                            y2: 1,
                            colorStops: [{
                                offset: 0,
                                color: '#00cccc' // 0% 处的颜色
                            }, {
                                offset: 1,
                                color: '#ffff99' // 100% 处的颜色
                            }],
                            globalCoord: false // 缺省为 false
                        }
                    ], //每个柱子的颜色设置
                    seriesDataList = [2800, 1700, 1200, 1000, 900, 600, 400, 500, 550, 480, 320, 230, 380]; //柱子高度数据
                var option = {
                    color: colorList,
                    tooltip: {
                        show: true,
                        trigger: 'item',
                        formatter: "{c}"
                    },
                    toolbox: {
                        show: true,
                        feature: {
                            mark: {
                                show: true
                            },

                        }
                    },
                    grid: {
                        left: '0%',
                        right: '0%',
                        bottom: '0%',
                        height: '90%',
                        width: '100%',
                        containLabel: true
                    },
                    xAxis: [
                        {
                            type: 'category',
                            axisLine: {
                                lineStyle: {
                                    type: 'solid',
                                    color: '#d7d7d7',//左边线的颜色
                                    width: '1'//坐标线的宽度
                                }
                            },
                            axisLabel: {
                                interval: 0,
                                rotate: 40,
                                show: true,
                                splitNumber: 15,

                                textStyle: {
                                    //fontFamily: "微软雅黑",
                                    fontSize: 14,
                                    color: '#000'
                                },

                            },

                            data: ['东部地区', '南部地区', '东部战区',
                                '南部战区', '南部战区', '陆军', '海军', '空军',
                                '火箭军', '战略支援部队', '军委办公厅', '定州市', '辛集市'],
                            axisTick: {

                                alignWithLabel: true
                            }
                        }
                    ],
                    yAxis: [
                        {
                            type: 'value',
                            name: '',
                            splitLine: {  //分割线
                                show: true,
                                // color:"#fff",
                                lineStyle: {
                                    color: '#d7d7d7'
                                }
                            },
                            axisLabel: {
                                interval: 0,
                                rotate: 0,
                                show: true,
                                splitNumber: 30,
                                textStyle: {
                                    fontSize: 12,
                                    color: '#000'
                                }
                            },
                            axisLine: {
                                lineStyle: {
                                    color: '#d7d7d7'
                                }
                            }
                        },

                    ],
                    series: [
                        {
                            name: '',
                            type: 'bar',
                            barWidth: 30,//柱图宽度
                            label: {
                                normal: {
                                    show: true,
                                    position: 'top',
                                    textStyle: {
                                        //   color: '#00cccc',
                                        fontSize: 14,
                                        fontFamily: 'Arail',
                                        fontWeight: 'bold'
                                    }
                                }
                            },
                            data: seriesDataList,
                            itemStyle: {
                                normal: {
                                    color: function (params) {
                                        return colorList[params.dataIndex]
                                    },
                                    label: {
                                        show: true,
                                        position: 'top',
                                        formatter: '{c}',
                                        textStyle: {
                                            color: colorList
                                        }
                                    }
                                }
                            }
                        }
                    ]
                };
                susBar.setOption(option);
                cacheChartState.spie2 = true
            },
            sumUnitStatic3: function () {   //2017各大单位核查数量统计
                var susBar = echarts.init(document.getElementById('unitSumBar3'));
                var colorList = [
                        {
                            type: 'linear',
                            x: 0,
                            y: 0,
                            x2: 0,
                            y2: 1,
                            colorStops: [{
                                offset: 0,
                                color: '#ec4435' // 0% 处的颜色
                            }, {
                                offset: 1,
                                color: '#ffff99' // 100% 处的颜色
                            }],
                            globalCoord: false // 缺省为 false
                        },
                        {
                            type: 'linear',
                            x: 0,
                            y: 0,
                            x2: 0,
                            y2: 1,
                            colorStops: [{
                                offset: 0,
                                color: '#ecd137' // 0% 处的颜色
                            }, {
                                offset: 1,
                                color: '#ffff99' // 100% 处的颜色
                            }],
                            globalCoord: false // 缺省为 false
                        },
                        {
                            type: 'linear',
                            x: 0,
                            y: 0,
                            x2: 0,
                            y2: 1,
                            colorStops: [{
                                offset: 0,
                                color: '#67c765' // 0% 处的颜色
                            }, {
                                offset: 1,
                                color: '#ffff99' // 100% 处的颜色
                            }],
                            globalCoord: false // 缺省为 false
                        },
                        {
                            type: 'linear',
                            x: 0,
                            y: 0,
                            x2: 0,
                            y2: 1,
                            colorStops: [{
                                offset: 0,
                                color: '#00cccc' // 0% 处的颜色
                            }, {
                                offset: 1,
                                color: '#ffff99' // 100% 处的颜色
                            }],
                            globalCoord: false // 缺省为 false
                        }
                    ], //每个柱子的颜色设置
                    seriesDataList = [2800, 1700, 1200, 1000, 900, 600, 400, 500, 550, 480, 320, 230, 380]; //柱子高度数据
                var option = {
                    color: colorList,
                    tooltip: {
                        show: true,
                        trigger: 'item',
                        formatter: "{c}"
                    },
                    toolbox: {
                        show: true,
                        feature: {
                            mark: {
                                show: true
                            },

                        }
                    },
                    grid: {
                        left: '0%',
                        right: '0%',
                        bottom: '0%',
                        height: '90%',
                        width: '100%',
                        containLabel: true
                    },
                    xAxis: [
                        {
                            type: 'category',
                            axisLine: {
                                lineStyle: {
                                    type: 'solid',
                                    color: '#d7d7d7',//左边线的颜色
                                    width: '1'//坐标线的宽度
                                }
                            },
                            axisLabel: {
                                interval: 0,
                                rotate: 40,
                                show: true,
                                splitNumber: 15,

                                textStyle: {
                                    //fontFamily: "微软雅黑",
                                    fontSize: 14,
                                    color: '#000'
                                },

                            },

                            data: ['东部地区', '南部地区', '东部战区',
                                '南部战区', '南部战区', '陆军', '海军', '空军',
                                '火箭军', '战略支援部队', '军委办公厅', '定州市', '辛集市'],
                            axisTick: {

                                alignWithLabel: true
                            }
                        }
                    ],
                    yAxis: [
                        {
                            type: 'value',
                            name: '',
                            splitLine: {  //分割线
                                show: true,
                                // color:"#fff",
                                lineStyle: {
                                    color: '#d7d7d7'
                                }
                            },
                            axisLabel: {
                                interval: 0,
                                rotate: 0,
                                show: true,
                                splitNumber: 30,
                                textStyle: {
                                    fontSize: 12,
                                    color: '#000'
                                }
                            },
                            axisLine: {
                                lineStyle: {
                                    color: '#d7d7d7'
                                }
                            }
                        },

                    ],
                    series: [
                        {
                            name: '',
                            type: 'bar',
                            barWidth: 30,//柱图宽度
                            label: {
                                normal: {
                                    show: true,
                                    position: 'top',
                                    textStyle: {
                                        //   color: '#00cccc',
                                        fontSize: 14,
                                        fontFamily: 'Arail',
                                        fontWeight: 'bold'
                                    }
                                }
                            },
                            data: seriesDataList,
                            itemStyle: {
                                normal: {
                                    color: function (params) {
                                        return colorList[params.dataIndex]
                                    },
                                    label: {
                                        show: true,
                                        position: 'top',
                                        formatter: '{c}',
                                        textStyle: {
                                            color: colorList
                                        }
                                    }
                                }
                            }
                        }
                    ]
                };
                susBar.setOption(option);
                cacheChartState.spie3 = true
            },
            /**
             * 输入框搜索
             */
            searchInput: function (type) {
                layer.msg('搜索:' + type)
            }
        };
        _fn.init();
        this._fn = _fn
    })(window)
</script>
</body>
</html>